<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="../public/public.jsp" %>

<% int rowColor = 1; 
	int pageSize = ((Integer)valueStack.findValue("pageForm.pageSize")).intValue();
	int pageNo = ((Integer)valueStack.findValue("pageForm.pageNo")).intValue();
	int rowNo = (pageNo-1)*pageSize+1;
%>
    <table border="0" width="100%" bgcolor="#999999" border"0" align="center" cellspacing="1"> 
    	<thead>
    	<%--
    	<s:if test="pagePosition.toLowerCase().equals('top') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#FFFFFF">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
   		</s:if>
    	 --%>
    		<tr height="20" bgcolor="#A0C6E5">
    			<th align="left" width="10"><input type="checkbox" name="checkAll" onclick="selectAll(this.checked)" alt="全选"></th>
    			<th align="left" width="10%"><font color="snow" size="2">序号</font></th>
    			<th align="left" width="20%"><font color="snow" size="2">角色名</font></th>
    			<th align="left" width="20%"><font color="snow" size="2">中文名</font></th>
    			<th align="left" width="12%"><font color="snow" size="2">状态</font></th>
    			<th align="left" width="12%"><font color="snow" size="2">权限</font></th>
    			<th align="left" width="20%"><font color="snow" size="2">备注</font></th>
    		</tr>
    	</thead>
    	<tbody>
    		<s:iterator value="data">
    		<% if((rowColor++ %2)==0){ %>
    		<tr bgcolor="#FFFFCC" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%}else{ %>
    		<tr bgcolor="#FFFFFF" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%} %>
    			<td><input type="checkbox" name="formMap.ids" value="<s:property value='id'/>"></td>
    			<th><font color="#000000" size="2">
    			<a href='javascript:goUpdate(<s:property value="id"/>)' style="cursor:hand">
    			<%=rowNo++ %></a>
    			</font></th>
    			<td><font color="#000000" size="2"><s:property value="roleName"/></font></td>
    			<td><font color="#000000" size="2"><s:property value="roleCname"/></font></td>
    			<td><font color="#000000" size="2"><s:if test="sts=='ACTV'">可用</s:if><s:else>禁用</s:else></font></td>
				<td><a href='rpm.action?cmd=main&po.roleId=<s:property value="id"/>'><font size="2">设置</font></a></td>
    			<td><font color="#000000" size="2"><s:property value="remark"/></font></td>
    		</tr>
    		</s:iterator>
    	</tbody>
		<tfoot>
    	<%-- 
    		<s:if test="pagePosition.toLowerCase().equals('buttom') || pagePosition.toLowerCase().equals('all')">
    		</s:if>
    	--%>
    		<tr bgcolor="#FFFFFF">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    	</tfoot>
    </table>